﻿using System;

namespace ModelChecking.ModelValidation.LongitudinalModel
{
	public class CheckingTypeStates
	{
		public CheckingOrder BeamAndStructColumn { get; set; }

		public CheckingOrder BeamAndStructWall { get; set; }

		public CheckingOrder BeamAndFloor { get; set; }

		public CheckingOrder BeamAndArchColumn { get; set; }

		public CheckingOrder BeamAndArchWall { get; set; }

		public CheckingOrder StructColumnAndStructWall { get; set; }

		public CheckingOrder StructColumnAndFloor { get; set; }

		public CheckingOrder StructColumnAndArchWall { get; set; }

		public CheckingOrder StructWallAndFloor { get; set; }

		public CheckingOrder StructWallAndArchWall { get; set; }

		public CheckingOrder FloorAndArchColumn { get; set; }

		public CheckingOrder FloorAndArchWall { get; set; }

		public CheckingOrder ArchColumnAndArchWall { get; set; }

		public CheckingTypeStates()
		{
			this.BeamAndStructColumn = CheckingOrder.CO_SecondToFirst;
			this.BeamAndStructWall = CheckingOrder.CO_FirstToSecond;
			this.BeamAndFloor = CheckingOrder.CO_FirstToSecond;
			this.BeamAndArchColumn = CheckingOrder.CO_FirstToSecond;
			this.BeamAndArchWall = CheckingOrder.CO_FirstToSecond;
			this.StructColumnAndStructWall = CheckingOrder.CO_FirstToSecond;
			this.StructColumnAndFloor = CheckingOrder.CO_FirstToSecond;
			this.StructColumnAndArchWall = CheckingOrder.CO_FirstToSecond;
			this.StructWallAndFloor = CheckingOrder.CO_FirstToSecond;
			this.StructWallAndArchWall = CheckingOrder.CO_FirstToSecond;
			this.FloorAndArchColumn = CheckingOrder.CO_FirstToSecond;
			this.FloorAndArchWall = CheckingOrder.CO_FirstToSecond;
			this.ArchColumnAndArchWall = CheckingOrder.CO_FirstToSecond;
		}

		public CheckingTypeStates(CheckingTypeStates other)
		{
			this.BeamAndStructColumn = other.BeamAndStructColumn;
			this.BeamAndStructWall = other.BeamAndStructWall;
			this.BeamAndFloor = other.BeamAndFloor;
			this.BeamAndArchColumn = other.BeamAndArchColumn;
			this.BeamAndArchWall = other.BeamAndArchWall;
			this.StructColumnAndStructWall = other.StructColumnAndStructWall;
			this.StructColumnAndFloor = other.StructColumnAndFloor;
			this.StructColumnAndArchWall = other.StructColumnAndArchWall;
			this.StructWallAndFloor = other.StructWallAndFloor;
			this.StructWallAndArchWall = other.StructWallAndArchWall;
			this.FloorAndArchColumn = other.FloorAndArchColumn;
			this.FloorAndArchWall = other.FloorAndArchWall;
			this.ArchColumnAndArchWall = other.ArchColumnAndArchWall;
		}

		public CheckingOrder IncludeCheckingType(DeductionRelationshipPriority firstLevel, DeductionRelationshipPriority secondLevel)
		{
			if (firstLevel == DeductionRelationshipPriority.CPL_StructColumn && secondLevel == DeductionRelationshipPriority.CPL_Beam)
			{
				return this.BeamAndStructColumn;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_Beam && secondLevel == DeductionRelationshipPriority.CPL_StructWall)
			{
				return this.BeamAndStructWall;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_Beam && secondLevel == DeductionRelationshipPriority.CPL_Floor)
			{
				return this.BeamAndFloor;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_Beam && secondLevel == DeductionRelationshipPriority.CPL_ArchColumn)
			{
				return this.BeamAndArchColumn;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_Beam && secondLevel == DeductionRelationshipPriority.CPL_ArchWall)
			{
				return this.BeamAndArchWall;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_StructColumn && secondLevel == DeductionRelationshipPriority.CPL_StructWall)
			{
				return this.StructColumnAndStructWall;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_StructColumn && secondLevel == DeductionRelationshipPriority.CPL_Floor)
			{
				return this.StructColumnAndFloor;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_StructColumn && secondLevel == DeductionRelationshipPriority.CPL_ArchWall)
			{
				return this.StructColumnAndArchWall;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_StructWall && secondLevel == DeductionRelationshipPriority.CPL_Floor)
			{
				return this.StructWallAndFloor;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_StructWall && secondLevel == DeductionRelationshipPriority.CPL_ArchWall)
			{
				return this.StructWallAndArchWall;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_Floor && secondLevel == DeductionRelationshipPriority.CPL_ArchColumn)
			{
				return this.FloorAndArchColumn;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_Floor && secondLevel == DeductionRelationshipPriority.CPL_ArchWall)
			{
				return this.FloorAndArchWall;
			}
			if (firstLevel == DeductionRelationshipPriority.CPL_ArchColumn && secondLevel == DeductionRelationshipPriority.CPL_ArchWall)
			{
				return this.ArchColumnAndArchWall;
			}
			return CheckingOrder.CO_NoCheck;
		}
	}
}
